
<section class="container">
	<div class="content-wrap">
	<div class="content">
		<section class="hots" style="visibility: visible; /*animation-name: fadeInUp;*/">
			<div class="section-title">
				<h3>人气推荐</h3>
			</div>
      <ul>
        <?php foreach ($recommends as $rec) {
          $id = $rec['id'];
          $title = $rec['title'];
          $subtract = $rec['subtract'];
          $thumbnail = $rec['thumbnail'] ? $rec['thumbnail'] : $defaultImage;
          ?>
          <li>
            <div class="thumbnail">
              <a href="/article/index/<?php echo $id ?>" title="<?php echo $title ?>">
                <img src="<?php echo $thumbnail ?>" alt="<?php echo $title ?>"/>
              </a>
            </div>
            <h4><a href="/article/index/<?php echo $id ?>" title="<?php echo $title ?>"><?php echo $title ?></a></h4>
            <p><?php echo $subtract; ?></p>
          </li>
        <?php 
      } ?>
      </ul>
    </section>

	  <div class="title">
			<h3>最新发布</h3>
      <div class="more"><a href="http://www.lilaiqun.com">感谢支持作者</a></div>
    </div>
     
    <?php foreach ($posts as $post) {
      $catId = $post['catid'];
      $catName = isset($post['catName']) ? $post['catName'] : '';
      $tagNames = isset($post['tagName']) ? $post['tagName'] : [];
      ?>
      <article class="excerpt excerpt-1">
        <div class="focus thumb">
          <a href="/article/index/<?php echo $post['id'] ?>" title="<?php echo $post['title'] ?>">
            <img src="<?php if ($post['thumbnail']) echo $post['thumbnail'];
                      else echo $defaultImage ?>" alt="<?php echo $post['title'] ?>">
          </a>
        </div>
        <header>
          <h2>
            <a href="/article/index/<?php echo $post['id'] ?>" title="<?php echo $post['title'] ?>"><?php echo $post['title'] ?></a>
          </h2>
          <?php foreach ($tagNames as $tagName) { ?>
          <i class="public-icon-first"><?php echo $tagName ?></i>
          <?php 
        } ?>
          <p class="note"><?php echo $post['subtract'] ?></p>
          <p class="meta"><a href="/category/index/<?php echo $catId ?>" rel="category"><?php echo $catName ?></a><span class="pvs"> |</span><span class="author"><?php echo $post['author'] ?></span><time><?php echo substr($post['time'], 0, 10) ?></time><span class="pv">阅读(<?php echo $post['read'] + 100 ?>)</span><span class="pvtags"></span></p>
        </header>
      </article>
    <?php 
  } ?>

  <?php echo $sPager?>

</div>
</div>
